package contest.p1529;

public class Solution {
    public int minFlips(String target) {
        int res = 0;
        char prev = '0';
        for (int i = 0; i < target.length(); i++) {
            char c = target.charAt(i);
            if (c != prev) {
                res++;
            }
            prev = c;
        }
        return res;
    }
}